What is probeRichAttr_?

I am just starting out with DXL and have come across a script that uses probeRichAttr_ a couple of times.   I've been trying to find what this function does but can't find it in the developer's manual.  What does this function do and what type does it return?

 

Chris Cote


Christopher Cote - Thu Oct 27 19:36:12 EDT 2016

Re: What is probeRichAttr_?
DOORSHAM - Thu Oct 27 21:29:53 EDT 2016

Function returns a string.

Function is defined in one of the include files -- function use to be unencrypted but now it may be.

Re: What is probeRichAttr_?
7XUT_Antonio_Norkus - Fri Oct 28 01:45:04 EDT 2016

That function (and its partner, probeAttr_) provide a safe way of getting the contents of an attribute, in case the attribute doesn't exist.

 

If you do:

string s = richTextWithOle(o."attributeName")

and attributeName doesn't exist, you'll get a DXL runtime error and the script is halted.

Instead, if you do:

string s = probeRichAttr_(o, "attributeName")

and attributeName doesn't exist, you'll get an empty string, allowing the DXL to continue.

Re: What is probeRichAttr_?
PekkaMakinen - Fri Oct 28 02:48:08 EDT 2016

The probeAttr functions are defined in lib\dxl\utils directory file attrutil.inc - take a peek in this file to see more.

At least in my installation of 9.6.0.3 most of those files in utils are still unencrypted.